<template>
    <view class="add-header" :style="{paddingTop:statusBar+'px'}">
        <view class="head-text head-left" @click="goBack">取消</view>
        <view class="head-text head-center">添加{{title}}</view>
        <view class="head-text head-right"></view>
    </view>
</template>
<script>
    export default {
        emits:['onSelect'],
        props:{
            title:String,
            default:""
        },
        data(){
            return {
            }
        },
        created() {
            uni.getSystemInfo({
                success: (e) => {
                    this.statusBar = e.statusBarHeight;
                }
            })
        },
        methods: {
            goBack() {
                uni.navigateBack({
                    delta: 1
                })
            },
        }
    }
</script>
<style lang="scss" >
    .add-header{
        background: #3c96f3;
        color: #fff;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 10px;
        .head-text{
            font-size: 16px;
            padding: 15px 0;
        }
        .head-center{
            font-size: 22px;
        }
    }
</style>
